{% extends 'base.html' %}
{% load staticfiles %}

{% block title %}个人信息 - 饱了么{% endblock %}

{% block body %}
<h1>个人信息</h1>
<table>
  <tr>
    <td>昵称</td><td>{{userinfo.nickname}}</td>
  </tr>
  <tr>
    <td>账号</td><td>{{userinfo.account}}</td>
  </tr>
  <tr>
    <td>地址</td><td>{{userinfo.address}}</td>
  </tr>
  <tr>
    <td>联系电话</td><td>{{userinfo.phone}}</td>
  </tr>
  <tr>
    <td>电话(可选)</td><td>{{userinfo.ex_phone}}</td>
  </tr>
</table>
<hr/>
<h2>我的订单:</h2>
<br />
{% for order in userinfo.orders %}
  订单状态:{{order.status}}&nbsp;&nbsp;&nbsp;<a href='/shop/{{order.shop.id}}'>店铺:{{order.shop.name}}</a>&nbsp;&nbsp;&nbsp;订单日期:{{order.time}}<br />
  订单内容:<br />
  {% for cuisine in order.cuisines %}
    {{cuisine.name}} -- {{cuisine.price}}元
    <br />
  {% endfor %}
  <hr />
{% endfor %}
{% endblock %}
